package cn.gp.chat.commom.resp;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class FriendRequestVo {
    private Long id;
    private Long requesterId;
    private Long receiverId;
    private String requestMessage;
    private Integer status; // 0-待处理 1-已接受 2-已拒绝
    private Date createTime;
    
    // 请求者信息
    private String requesterUsername;
    private String requesterNickname;
    private String requesterAvatar;
    private Integer requesterStatus;
    
    // 用于前端显示的请求者信息对象
    private UserVo requesterInfo;
    
    public void setRequesterInfo(UserVo info) {
        this.requesterInfo = info;
        if (info != null) {
            this.requesterUsername = info.getUsername();
            this.requesterNickname = info.getNickname();
            this.requesterAvatar = info.getAvatar();
            this.requesterStatus = info.getStatus();
        }
    }
}